package top.v5it.japi.plus.example.jdbc.interceptor;

import lombok.extern.slf4j.Slf4j;
import top.v5it.japi.plus.core.spring.web.interceptor.AbstractJapiInterceptor;
import top.v5it.japi.plus.log.OperLogService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * 测试我的拦截器
 *
 * @author zhanpu
 * @date 2022/6/16
 */
@Slf4j
public class MyInterceptor extends AbstractJapiInterceptor {

    public MyInterceptor(OperLogService operLogService) {
        super(operLogService);
        log.info("MyInterceptor初始化成功");
    }

    @Override
    protected void preHandle(HttpServletRequest request, HttpServletResponse response, long startTime) throws Exception {
        log.info("MyInterceptor#preHandle");
    }

    @Override
    protected void prePostHandle(HttpServletRequest request, HttpServletResponse response, Map<String, String> authMap, long startTime) throws Exception {
        log.info("MyInterceptor#prePostHandle");
    }
}
